package com.hd.sup.modules.alarm.model;

import com.baomidou.mybatisplus.annotation.TableField;
import com.baomidou.mybatisplus.annotation.TableName;
import com.baomidou.mybatisplus.extension.activerecord.Model;
import lombok.*;

import java.io.Serializable;
import java.util.Date;

/**
 * <p>
 * 报警报告记录表
 * </p>
 *
 * @author chentl123
 * @since 2020-12-28
 */
@NoArgsConstructor
@AllArgsConstructor
@EqualsAndHashCode(callSuper = true)
@Data
@Builder
@TableName("sp_alarm_report")
public class AlarmReport extends Model<AlarmReport> {

    private static final long serialVersionUID = 1L;

    //查询构造
    public AlarmReport(String timeFlag, String regionCode, String enterpriseNo, String enterpriseName, String verifyStatus) {
        this.timeFlag = timeFlag;
        this.regionCode = regionCode;
        this.enterpriseNo = enterpriseNo;
        this.enterpriseName = enterpriseName;
        this.verifyStatus = verifyStatus;
    }

    /**
     * 记录id
     */
    private String id;
    /**
     * 查询开始日期
     */
    @TableField("start_date")
    private Date startDate;
    /**
     * 查询开始日期
     */
    @TableField("end_date")
    private Date endDate;
    /**
     * 时间标识
     */
    @TableField("time_flag")
    private String timeFlag;
    /**
     * 区域编码
     */
    @TableField("region_code")
    private String regionCode;
    /**
     * 审核状态
     */
    @TableField("verify_status")
    private String verifyStatus;
    /**
     * 审核时间
     */
    @TableField("verify_time")
    private Date verifyTime;
    /**
     * 审核人
     */
    @TableField("verify_by")
    private String verifyBy;
    /**
     * 生成状态
     */
    @TableField("generate_status")
    private String generateStatus;
    /**
     * 报告名称
     */
    private String name;
    /**
     * 创建人
     */
    @TableField("create_by")
    private String createBy;
    /**
     * 创建时间
     */
    @TableField("create_time")
    private Date createTime;
    /**
     * 更新时间
     */
    @TableField("update_time")
    private Date updateTime;
    /**
     * 更新人
     */
    @TableField("update_by")
    private String updateBy;
    /**
     * 部门id
     */
    @TableField("dept_id")
    private String deptId;
    /**
     * 报告json
     */
    @TableField("report_json")
    private String reportJson;
    /**
     * 时间参数
     */
    @TableField("date_str")
    private String dateStr;
    /**
     * 企业编号
     */
    @TableField("enterprise_no")
    private String enterpriseNo;
    /**
     * deptIds
     */
    @TableField("dept_ids")
    private String deptIds;

    @TableField(exist = false)
    private String enterpriseName;

    @TableField(exist = false)
    private boolean isReGenerated;

    @Override
    protected Serializable pkVal() {
        return this.id;
    }

}
